import { inject, injectable } from 'inversify';
import type { EditorMode, IToolbarService, IModeRegistry, ToolbarItem } from '../types';

@injectable()
export class ToolbarService implements IToolbarService {
    constructor(
        @inject('IModeRegistry') private modeRegistry: IModeRegistry
    ) { }

    getToolbarItems(mode: EditorMode): ToolbarItem[] {
        const feature = this.modeRegistry.getModeFeature(mode);
        return feature?.toolbarItems || [];
    }
} 